package com.midou.administration.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author MrChen
 * @since 2021-03-24
 */

/**
 * 用户表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;
//账号  密码 登录密码   支付密码  生日
    /**
     * 主键id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    /**
     * 用户账号
     */
    private String userCode;

    /**
     * 用户密码
     */
    private String userPassword;

    /**
     * 用户支付密码
     */
    private String userPaymentCode;

    /**
     * 生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date userBirthday;

    /**
     * 电话
     */
    private String userPhone;

    /**
     * 性别
     */
    private String userSex;

    /**
     * 用户账户金额
     */
    private Double userMoney;

    /**
     * 用户账户积分
     */
    private Integer userIntegral;

    /**
     * 用户等级
     */
    private String userLevel;

    /**
     * 会员优惠
     */
    private Float userDiscount;

    /**
     * 角色表外键
     */
    private Integer roleId;

    /**
     * 哪家店铺的会员
     */
    private Integer userBusinessId;

    /**
     * 头像
     */
    private String userPicture;

    /**
     * 用户姓名
     */
    private String userName;


    /**
     * 修改密码使用  就不创建Bo类了
     * 新密码    (上面旧密码)
     * 注解作用  表示不属于数据库的列,不用查询
     */
    @TableField(exist = false)
    private String newPwd;

    /**
     * 会员累计充值
     */


    private Double userCumulative;


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserPaymentCode() {
        return userPaymentCode;
    }

    public void setUserPaymentCode(String userPaymentCode) {
        this.userPaymentCode = userPaymentCode;
    }

    public Date getUserBirthday() {
        return userBirthday;
    }

    public void setUserBirthday(Date userBirthday) {
        this.userBirthday = userBirthday;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public Double getUserMoney() {
        return userMoney;
    }

    public void setUserMoney(Double userMoney) {
        this.userMoney = userMoney;
    }

    public Integer getUserIntegral() {
        return userIntegral;
    }

    public void setUserIntegral(Integer userIntegral) {
        this.userIntegral = userIntegral;
    }

    public String getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(String userLevel) {
        this.userLevel = userLevel;
    }

    public Float getUserDiscount() {
        return userDiscount;
    }

    public void setUserDiscount(Float userDiscount) {
        this.userDiscount = userDiscount;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getUserBusinessId() {
        return userBusinessId;
    }

    public void setUserBusinessId(Integer userBusinessId) {
        this.userBusinessId = userBusinessId;
    }

    public String getUserPicture() {
        return userPicture;
    }

    public void setUserPicture(String userPicture) {
        this.userPicture = userPicture;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNewPwd() {
        return newPwd;
    }

    public void setNewPwd(String newPwd) {
        this.newPwd = newPwd;
    }

    public Double getUserCumulative() {
        return userCumulative;
    }

    public void setUserCumulative(Double userCumulative) {
        this.userCumulative = userCumulative;
    }
}
